#ifndef __MESSAGE_H__
#define __MESSAGE_H__

/* Include files. */
#include "cplusplus.h"

/* Macro constant definitions. */

/* Type definitions. */

class message
{
public:
	message(const char *from, const char *to, u32 session, 
			const char *type, const char *msg):_from(from), 
			_to(to), _type(type), _msg(msg), _session(session) {}
	virtual ~message() {}
	void reset(const char *from, const char *to, u32 session, 
			const char *type, const char *msg);
	static void destroy(message* msg);
	static message * create(const char *from, const char *to,
			u32 session, const char *type, const char *msg);
	
public:
	static queue<message*> pool;
	string _from;
	string _to;
	string _type;
	string _msg;
	u32 _session;
};

/* External variable declarations. */

/* External function declarations. */

/* Macro API definitions. */

#endif

